<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TImage类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_t_image-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TImage类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<div class="dynheader">
类 TImage 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_t_image.png" usemap="#TImage_map" alt=""/>
  <map id="TImage_map" name="TImage_map">
<area href="class_t_image_base.html" alt="TImageBase" shape="rect" coords="0,56,80,80"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ae6df331fb3bfd2c1cb24a0f5cd51d8c6"><td class="memItemLeft" align="right" valign="top"><a id="ae6df331fb3bfd2c1cb24a0f5cd51d8c6"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TImage</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:ae6df331fb3bfd2c1cb24a0f5cd51d8c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc34dfca957eac855178c7f0c071fe54"><td class="memItemLeft" align="right" valign="top"><a id="abc34dfca957eac855178c7f0c071fe54"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TImage</b> (const image_t *nativeObj)</td></tr>
<tr class="separator:abc34dfca957eac855178c7f0c071fe54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a866d9fe675f23dcc39100a0204bf36a1"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image.html#a866d9fe675f23dcc39100a0204bf36a1">SetDrawType</a> (image_draw_type_t draw_type)</td></tr>
<tr class="separator:a866d9fe675f23dcc39100a0204bf36a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afee593d5c224b520be7d65abe977d5b6"><td class="memItemLeft" align="right" valign="top">image_draw_type_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image.html#afee593d5c224b520be7d65abe977d5b6">GetDrawType</a> () const</td></tr>
<tr class="separator:afee593d5c224b520be7d65abe977d5b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_t_image_base"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_t_image_base')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="class_t_image_base.html">TImageBase</a></td></tr>
<tr class="memitem:ab553fb3d418b1a2d19fdf34efc4cf82d inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top"><a id="ab553fb3d418b1a2d19fdf34efc4cf82d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TImageBase</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:ab553fb3d418b1a2d19fdf34efc4cf82d inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23f77229eaa8de1117d0bddee6907ff3 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top"><a id="a23f77229eaa8de1117d0bddee6907ff3"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TImageBase</b> (const image_base_t *nativeObj)</td></tr>
<tr class="separator:a23f77229eaa8de1117d0bddee6907ff3 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae56829186214d245b39d1244bda27c74 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#ae56829186214d245b39d1244bda27c74">SetImage</a> (char *name)</td></tr>
<tr class="separator:ae56829186214d245b39d1244bda27c74 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af62c1a9652867dde0fc5521436378c38 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#af62c1a9652867dde0fc5521436378c38">SetRotation</a> (float_t rotation)</td></tr>
<tr class="separator:af62c1a9652867dde0fc5521436378c38 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5d1b3db242fb0c2d01652e686fc321b inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#ad5d1b3db242fb0c2d01652e686fc321b">SetScale</a> (float_t scale_x, float_t scale_y)</td></tr>
<tr class="separator:ad5d1b3db242fb0c2d01652e686fc321b inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83450458f1790397dec582b1f4581e3b inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#a83450458f1790397dec582b1f4581e3b">SetAnchor</a> (float_t anchor_x, float_t anchor_y)</td></tr>
<tr class="separator:a83450458f1790397dec582b1f4581e3b inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f963d3696f97e0de848412a23f12841 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#a2f963d3696f97e0de848412a23f12841">SetSelected</a> (bool selected)</td></tr>
<tr class="separator:a2f963d3696f97e0de848412a23f12841 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a37aad87713c350321a4a8b25a4bc86 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#a2a37aad87713c350321a4a8b25a4bc86">SetSelectable</a> (bool selectable)</td></tr>
<tr class="separator:a2a37aad87713c350321a4a8b25a4bc86 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed880049e973c124bd2c45d861f603a9 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#aed880049e973c124bd2c45d861f603a9">SetClickable</a> (bool clickable)</td></tr>
<tr class="separator:aed880049e973c124bd2c45d861f603a9 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53f0ad045c689e4a2b18b9c04aea43a6 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#a53f0ad045c689e4a2b18b9c04aea43a6">GetImage</a> () const</td></tr>
<tr class="separator:a53f0ad045c689e4a2b18b9c04aea43a6 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79ce7eed111359837c541f815bc602d3 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">float_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#a79ce7eed111359837c541f815bc602d3">GetAnchorX</a> () const</td></tr>
<tr class="separator:a79ce7eed111359837c541f815bc602d3 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac53a3c75a4230e029a7f5fe80999a358 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">float_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#ac53a3c75a4230e029a7f5fe80999a358">GetAnchorY</a> () const</td></tr>
<tr class="separator:ac53a3c75a4230e029a7f5fe80999a358 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1ff7b60e3229204d6c62ed121f65767 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">float_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#ae1ff7b60e3229204d6c62ed121f65767">GetScaleX</a> () const</td></tr>
<tr class="separator:ae1ff7b60e3229204d6c62ed121f65767 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb141ee63a73cd7f48a82694fa1bdfb5 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">float_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#abb141ee63a73cd7f48a82694fa1bdfb5">GetScaleY</a> () const</td></tr>
<tr class="separator:abb141ee63a73cd7f48a82694fa1bdfb5 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5564f2ab6fd94594378adc94ea5ec7cc inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">float_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#a5564f2ab6fd94594378adc94ea5ec7cc">GetRotation</a> () const</td></tr>
<tr class="separator:a5564f2ab6fd94594378adc94ea5ec7cc inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add8ea62a12d77bc5d890d3a0c7680b0f inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#add8ea62a12d77bc5d890d3a0c7680b0f">GetClickable</a> () const</td></tr>
<tr class="separator:add8ea62a12d77bc5d890d3a0c7680b0f inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ef1c442ebde32ee21b0332c717a8c27 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#a6ef1c442ebde32ee21b0332c717a8c27">GetSelectable</a> () const</td></tr>
<tr class="separator:a6ef1c442ebde32ee21b0332c717a8c27 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad86aa57705bfe86645ac4b2262036012 inherit pub_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_base.html#ad86aa57705bfe86645ac4b2262036012">GetSelected</a> () const</td></tr>
<tr class="separator:ad86aa57705bfe86645ac4b2262036012 inherit pub_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a2624137301f37562f4adee9eade95819"><td class="memItemLeft" align="right" valign="top"><a id="a2624137301f37562f4adee9eade95819"></a>
static <a class="el" href="class_t_image.html">TImage</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a2624137301f37562f4adee9eade95819"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a192bcf7f6303d475ff04aee62509238f"><td class="memItemLeft" align="right" valign="top"><a id="a192bcf7f6303d475ff04aee62509238f"></a>
static <a class="el" href="class_t_image.html">TImage</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const widget_t *nativeObj)</td></tr>
<tr class="separator:a192bcf7f6303d475ff04aee62509238f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a6a098a3267c7087c5320cc1f0c4759"><td class="memItemLeft" align="right" valign="top"><a id="a2a6a098a3267c7087c5320cc1f0c4759"></a>
static <a class="el" href="class_t_image.html">TImage</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (TWidget &amp;obj)</td></tr>
<tr class="separator:a2a6a098a3267c7087c5320cc1f0c4759"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c7d274e5906fc5cf69a0bdf44aed189"><td class="memItemLeft" align="right" valign="top"><a id="a0c7d274e5906fc5cf69a0bdf44aed189"></a>
static <a class="el" href="class_t_image.html">TImage</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const TWidget &amp;obj)</td></tr>
<tr class="separator:a0c7d274e5906fc5cf69a0bdf44aed189"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6178559d48669e7f1fdc206a0d8e290f"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image.html#a6178559d48669e7f1fdc206a0d8e290f">Create</a> (TWidget &amp;parent, xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:a6178559d48669e7f1fdc206a0d8e290f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_class_t_image_base"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_class_t_image_base')"><img src="closed.png" alt="-"/>&#160;静态 Public 成员函数 继承自 <a class="el" href="class_t_image_base.html">TImageBase</a></td></tr>
<tr class="memitem:a2a9d30b3368b0ada6de02eb88aae5e3b inherit pub_static_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top"><a id="a2a9d30b3368b0ada6de02eb88aae5e3b"></a>
static <a class="el" href="class_t_image_base.html">TImageBase</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a2a9d30b3368b0ada6de02eb88aae5e3b inherit pub_static_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeba68855b14567b48ca02948bbf389a7 inherit pub_static_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top"><a id="aeba68855b14567b48ca02948bbf389a7"></a>
static <a class="el" href="class_t_image_base.html">TImageBase</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const widget_t *nativeObj)</td></tr>
<tr class="separator:aeba68855b14567b48ca02948bbf389a7 inherit pub_static_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a869519e0c67f298dd81ce7701174e552 inherit pub_static_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top"><a id="a869519e0c67f298dd81ce7701174e552"></a>
static <a class="el" href="class_t_image_base.html">TImageBase</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (TWidget &amp;obj)</td></tr>
<tr class="separator:a869519e0c67f298dd81ce7701174e552 inherit pub_static_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33ed555ed4c71ee15eb6fb7c67385887 inherit pub_static_methods_class_t_image_base"><td class="memItemLeft" align="right" valign="top"><a id="a33ed555ed4c71ee15eb6fb7c67385887"></a>
static <a class="el" href="class_t_image_base.html">TImageBase</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const TWidget &amp;obj)</td></tr>
<tr class="separator:a33ed555ed4c71ee15eb6fb7c67385887 inherit pub_static_methods_class_t_image_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>图片控件。</p>
<p>用来显示一张静态图片，目前支持bmp/png/jpg等格式。</p>
<p>如果要显示gif文件，请用gif\_image。</p>
<p>如果要显示svg文件，请用svg\_image。</p>
<p>如果需要支持勾选效果，请设置**selectable**属性。</p>
<p>如果需要支持点击效果，请设置**clickable**属性。</p>
<p>image_t是image\_base\_t的子类控件，image_base_t的函数均适用于image_t控件。</p>
<p>在xml中使用"image"标签创建图片控件。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">image</span> <span class="keyword">style</span>=<span class="stringliteral">&quot;border&quot;</span> <span class="keyword">image</span>=<span class="stringliteral">&quot;earth&quot;</span> <span class="keyword">draw_type</span>=<span class="stringliteral">&quot;icon&quot;</span> /&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考： </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/images.xml">image.xml</a></p>
<p>在c代码中使用函数image_create创建图片控件。如：</p>
<blockquote class="doxtable">
<p>创建之后:</p>
<p>需要用widget_set_image设置图片名称。</p>
<p>可以用image_set_draw_type设置图片的绘制方式。 </p>
</blockquote>
<blockquote class="doxtable">
<p>绘制方式请参考image\_draw\_type\_t </p>
</blockquote>
<blockquote class="doxtable">
<p>绘制方式的属性值和枚举值: </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk/blob/master/src/base/enums.c#L98">image_draw_type_name_value</a></p>
<blockquote class="doxtable">
<p>完整示例请参考： </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk-c-demos/blob/master/demos/image.c">image demo</a></p>
<p>可用通过style来设置控件的显示风格，如背景和边框等。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">image</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;border&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">normal</span> <span class="keyword">border_color</span>=<span class="stringliteral">&quot;#000000&quot;</span> <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#e0e0e0&quot;</span> <span class="keyword">text_color</span>=<span class="stringliteral">&quot;black&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">style</span>&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">image</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考： </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/styles/default.xml#L313">theme default</a> </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a6178559d48669e7f1fdc206a0d8e290f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6178559d48669e7f1fdc206a0d8e290f">&#9670;&nbsp;</a></span>Create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TWidget TImage::Create </td>
          <td>(</td>
          <td class="paramtype">TWidget &amp;&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建image对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="afee593d5c224b520be7d65abe977d5b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afee593d5c224b520be7d65abe977d5b6">&#9670;&nbsp;</a></span>GetDrawType()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">image_draw_type_t TImage::GetDrawType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>图片的绘制方式(仅在没有旋转和缩放时生效)。 </p>

</div>
</div>
<a id="a866d9fe675f23dcc39100a0204bf36a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a866d9fe675f23dcc39100a0204bf36a1">&#9670;&nbsp;</a></span>SetDrawType()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImage::SetDrawType </td>
          <td>(</td>
          <td class="paramtype">image_draw_type_t&#160;</td>
          <td class="paramname"><em>draw_type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置图片的绘制方式。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">draw_type</td><td>绘制方式(仅在没有旋转和缩放时生效)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
<li>output/awtk_cpp.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
